Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify header protection sampling #4404

Closed
wants to merge 2 commits into from
Closed

Clarify header protection sampling #4404

wants to merge 2 commits into from

Conversation

PaulDance
Copy link
Contributor

Hello gentlemen!

The header protection sampling (HPS) is quite simple, as it is just selecting 16 bytes out of the encrypted payload, but we think the current description is really confusing.

Indeed, section 5.4.2 explains the process with pseudocodes computing an offset relative to the beginning of an entire packet which payload is the encrypted one. However, when applying the AEAD function, one cannot do it in-place, so additional allocation must be reserved in any case. Therefore, one most probably has access to the encrypted payload separately from the unprotected packet, headers and payload.

Thus, this PR proposes two things, split in different commits:

  • Clearly and explicitly specify the two already-existing pseudocodes sample from an entire packet.
  • Add another pseudocode explaining how the sampling can be achieved for both short-header and long-header packets.

We have not changed or removed any existing content however, as we believe this draft could use some more explanations and clarifications here and there, rather than less with confusing elements, even if it means a bit of duplication.

Please tell us if there is any form of typo, wrong wording, grammatical issue or just general mistake, especially concerning the new pseudocode.

Hope this helps.
Cheers,
Paul.

The Header Protection Sample process operates on the ciphertext only,
but the current description in section 5.4.2 explains it headers
included, which is a bit confusing. This explicitly specifies the
`packet` variable used in pseudocodes is with headers included.

Signed-off-by: Paul Mabileau <paulmabileau@hotmail.fr>
Header protection sampling operates on ciphertext, therefore it is
possible to explain it relative to the ciphertext only, without any form
of headers involved. This commit proposes just that, with a pseudocode
included.

Signed-off-by: Paul Mabileau <paulmabileau@hotmail.fr>
@LPardue LPardue added the -tls label Nov 24, 2020
@janaiyengar janaiyengar added the editorial An issue that does not affect the design of the protocol; does not require consensus. label Dec 1, 2020
@PaulDance
Copy link
Contributor Author

Any news?

@larseggert
Copy link
Member

We typically have the high-level discussion on such things in an issue first, and if that seems to get consensus, a PR is opened. We don't have to do that for this one, I'll start tracking it as if it were an issue and hopefully you'll get feedback, but please remember for the future.

@larseggert larseggert linked an issue Dec 10, 2020 that may be closed by this pull request
@larseggert
Copy link
Member

Since our project board isn't set up for tracking PRs alongside issues, I opened #4435 .

@PaulDance
Copy link
Contributor Author

Please do not use a pull request to open a new design issue; it may not be noticed.

@larseggert Sorry I missed this in the contributing guidelines... In the future, if I open an issue explaining such a suggestion for example, could I then propose a PR right after in order to show more precisely what I intend, or should I still wait for consensus first?

@larseggert
Copy link
Member

Your call. I'd personally wait for a bit with a PR, just to avoid wasting work if the issue doesn't get traction.

@PaulDance
Copy link
Contributor Author

Alright, thanks!

@martinthomson
Copy link
Member

Thanks for suggesting this Paul. I wasn't smart enough to see what was needed, but @kazuho was and I think we have a much clearer document as a result.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-tls editorial An issue that does not affect the design of the protocol; does not require consensus.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clarify header protection sampling
5 participants